#pragma once

#ifndef _CR_HTTP_PROXIES_H_
#define _CR_HTTP_PROXIES_H_

NS_CR_BEGIN

namespace http
{
	class Proxies
	{
	public:
		Proxies() 
		{}

		Proxies(const _STD initializer_list<_STD pair<const string, string>>& hosts)
			: hosts_( hosts )
		{}

		bool has(const string& protocol) const
		{
			return hosts_.count(protocol) > 0;
		}

		const string& operator[](const string& protocol)
		{
			return hosts_[protocol];
		}

	private:
		_STD map<string, string> hosts_;
	};
}

NS_CR_END

#endif // !_CR_HTTP_PROXIES_H_
